#pragma once
#include "vertex_buffer.h"
#include "opengl.h"

namespace krryn{
namespace system_imp{
	class vertex_buffer_opengl : public view::vertex_buffer{
	public:
		vertex_buffer_opengl(size_t a_VertexSizeInBytes, size_t a_NumberOfVertices);
		virtual ~vertex_buffer_opengl();

		virtual void write_data(size_t a_OffsetInBytes, size_t a_SizeInBytes, const void *a_Source);
		virtual void read_data(size_t a_OffsetInBytes, size_t a_SizeInBytes, void *a_Destination);
		GLuint get_buffer_id() const;
	protected:
		virtual void* lock_impl();
		virtual void unlock_impl();
	private:
		GLuint m_BufferId;
	};
}
}